package www.xudan.android_ffmpeg;

import android.media.MediaPlayer;
import android.os.Bundle;
import android.widget.VideoView;

import androidx.appcompat.app.AppCompatActivity;

import www.xudan.android_ffmpeg.ijkplayer.MyBasePlayerView;

public class IjkPlayerActivity extends AppCompatActivity {

    private MyBasePlayerView mBpv;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_ijk_player);
        mBpv = findViewById(R.id.bpv);
        mBpv.setPath(Constance.https_path);
        VideoView videoiew = findViewById(R.id.videoiew);
        videoiew.setVideoPath(Constance.https_path);
        videoiew.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
            @Override
            public void onPrepared(MediaPlayer mp) {
                mp.start();
            }
        });
    }
}
